Home > biomechZoo > Toolbox > Support Functions > longunit.m

longunit

PURPOSE ^

r = LONGUNIT(m,comp) creates unit vector same size as vector m along dimension of comp

SYNOPSIS ^

function r = longunit(m,comp)

DESCRIPTION ^

 r = LONGUNIT(m,comp) creates unit vector same size as vector m along dimension of comp

 ARGUMENTS
  m      ...  vector used for sizing
  comp   ...  direction. 'i','j','k' or 'x', 'y', 'z'

 RETURNS
  r      ...  unit vector size of m

 Example
 m = randn(100,1);
 r = longunit(m,'j') returns an 100 x 3 matrix with colums 1 and 3
 containing zeros and column 2 containing ones

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 10-Mar-2024 22:39:06 by m2html © 2005